//
//  Record.h
//  SimulacraDB
//
//  Created by Andre Cohen on 8/9/08.
//  Copyright 2008 __MyCompanyName__. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "RecordWrapperProtocol.h"
#import "RecordDataProtocol.h"
#import "PlainRecord.h"

@interface Record : NSObject {
	PlainRecord<RecordWrapperProtocol> *wrapper;
	NSMutableArray *dataBlocks;
}

@property PlainRecord<RecordWrapperProtocol> *wrapper;
@property(readonly) NSMutableArray *dataBlocks;

- (id)initWithWrapperClass:(Class)wrapperClass
				 dataClass:(Class)dataClass;

- (id)initWithWrapperClass:(Class)wrapperClass
			   dataClasses:(NSArray *)dataClasses;

- (Record *)clone;
- (ByteArray *)toByteArray;
- (int)size;

- (NSObject <RecordDataProtocol> *)getBlock:(int)block;

- (BOOL)recordBlock:(int)block lessThan:(Record *)record;
- (BOOL)recordBlock:(int)block greaterThan:(Record *)record;
- (BOOL)recordBlock:(int)block equalTo:(id)record;

@end
